package com.bd.scm.module;

//import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
//import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

//@SpringBootApplication
//@ComponentScan("com.bd")
//@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
//public class BdScmModuleApplication {
//
//    public static void main(String[] args) {
//        SpringApplication.run(BdScmModuleApplication.class, args);
//    }
//x
//}


@SpringBootApplication
@ComponentScan("com.bd.*")
@EnableSwagger2
@EnableCaching
//@MapperScan("com.bd.scm.dao")
//@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@EnableTransactionManagement
public class BdScmModuleApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(BdScmModuleApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(BdScmModuleApplication.class);
    }
}